nRF52832 펌웨어 설치 및 DFU 설치파일 작성(S112)

□ 플래시 메모리 맵

구 분	시작 주소	영역 크기(KB)
소프트 디바이스	0x00000	100
어플리케이션 펌웨어	0x19000	92
알고리즘 펌웨어	0x30000	144
DFU 스페이스	0x54000	144
BootLoader	0x78000	24
DFU Settings(백업)	0x7E000	4
DFU Settings	0x7F000	4

* Peripheral 전용 소프트 디바이스(S112)을 사용, 플래시 저장 공간 절약

□ 펌웨어 최초 설치

o DFU Settings 작성

bin> dfu_settings C3-NRF-0.3.5.hex CX-ALG-0.0.5.hex

z2o_hex : 00019000-0002B18A (74123 bytes)

z2o_hex : C3-NRF-0.3.5.hex, converted to C3-NRF-0.3.5.bin(74124 bytes).

dfu_settings : C3-NRF-0.3.5.hex, 74124 bytes, CRC32 133AC472

z2o_hex : 00030000-0004B94E (112975 bytes)

z2o_hex : CX-ALG-0.0.5.hex, converted to CX-ALG-0.0.5.bin(112976 bytes).

dfu_settings : CX-ALG-0.0.5.hex, 112976 bytes, CRC32 DD7176C6

* ‘C3-NRF-0.3.5_settings.hex’ 생성

o 펌웨어 및 부트로더 설치

bin> dfu_erase_all

bin>D:\nrf-command-line-tools\bin\nrfjprog --eraseall

Erasing user available code and UICR flash areas.

Applying system reset.

bin> dfu_program s112_nrf52_7.3.0_softdevice

[ #################### ]   1.035s | Erase file - Done erasing

[ #################### ]   1.845s | Program file - Done programming

[ #################### ]   0.763s | Verify file - Done verifying

bin> dfu_program C3-NRF-0.3.5

[ #################### ]   0.790s | Erase file - Done erasing

[ #################### ]   1.352s | Program file - Done programming

[ #################### ]   0.560s | Verify file - Done verifying

bin> dfu_program CX-ALG-0.0.5

[ #################### ]   1.100s | Erase file - Done erasing

[ #################### ]   2.061s | Program file - Done programming

[ #################### ]   0.854s | Verify file - Done verifying

bin> dfu_program C3-NRF-0.3.5_settings

[ #################### ]   0.079s | Erase file - Done erasing

[ #################### ]   0.037s | Program file - Done programming

[ #################### ]   0.012s | Verify file - Done verifying

bin> dfu_program BL-NRF-0.0.2

[ #################### ]   0.221s | Erase file - Done erasing

[ #################### ]   0.455s | Program file - Done programming

[ #################### ]   0.185s | Verify file - Done verifying

□ 펌웨어 설치파일 작성

o 명령 실행

bin> dfu_build C3-NRF-0.3.5 CX-ALG-0.0.5 BL-NRF-0.0.2

...

z2o_hex : 00019000-0002B18A (74123 bytes)

z2o_hex : C3-NRF-0.3.5.hex, converted to C3-NRF-0.3.5.bin(74124 bytes).

dfu_settings : C3-NRF-0.3.5.hex, 74124 bytes, CRC32 133AC472

z2o_hex : 00030000-0004B94E (112975 bytes)

z2o_hex : CX-ALG-0.0.5.hex, converted to CX-ALG-0.0.5.bin(112976 bytes).

dfu_settings : CX-ALG-0.0.5.hex, 112976 bytes, CRC32 DD7176C6

Parsing input files.

Merging file "C3-NRF-0.3.5.hex" into output.

Merging file "CX-ALG-0.0.5.hex" into output.

Storing merged file.

Parsing input files.

Merging file "BL-NRF-0.0.2.hex" into output.

Merging file "C3-NRF-0.3.5_settings.hex" into output.

Storing merged file.

Parsing input files.

Merging file "C3-NRF-0.3.5-APP.hex" into output.

Merging file "C3-NRF-0.3.5-BL.hex" into output.

Storing merged file.

Parsing input files.

Merging file "s112_nrf52_7.3.0_softdevice.hex" into output.

Merging file "C3-NRF-0.3.5-APP-BL.hex" into output.

Storing merged file.

C3-NRF-0.3.5-ALL.hex, successfully generated.

o 생성 파일

파일명	포함 파일
C3-NRF-0.3.5-APP.hex	C3-NRF-0.3.5.hex, CX-ALG-0.0.5.hex
C3-NRF-0.3.5-BL.hex	BL-NRF-0.0.2.hex, C3-NRF-0.3.5_settings.hex
C3-NRF-0.3.5-APP-BL.hex	C3-NRF-0.3.5-APP.hex, C3-NRF-0.3.5-BL.hex
C3-NRF-0.3.5-ALL.hex	SOFT_DEVICE, C3-NRF-0.3.5-APP-BL.hex

* SOFT_DEVICE⋅C3-NRF-0.3.5-APP.hex 설치時, 부트로더 없이 제품 기본동작 수행

□ PDFU 설치파일 작성

o 어플리케이션 펌웨어

dfu_mk_pkg <firmaware_file> 3

* ‘PDFU-<firmware_file>.zip’ 생성, PDFU로 펌웨어 업데이트 실행

o 알고리즘 펌웨어

dfu_mk_pkg <firmaware_file> 2

* ‘PDFU-<firmware_file>.zip’ 생성, PDFU로 펌웨어 업데이트 실행

□ DFU 명령어 설치

o ‘dfu.zip’을 압축 해제한 폴더를 PATH 환경변수에 추가

o DFU_BIN 환경변수를 “‘dfu.zip’ 압축 해제 폴더\dfu”로 설정

o DFU_SOFTDEVICE 환경변수를 S112로 설정